﻿$(function(){//延迟加载
	var dvIds=$('#dvIds').val();
	if(dvIds!=''){
		document.getElementById('jxmap').src="creatjxmap?dvIds="+dvIds;
	}
	
	$('#ss').searchbox({ 
		searcher:function(value,name){
//		alert(value + "," + name);
//			alert(name);
			if(name=='usercode'){
				document.getElementById('jxmap').src="getcusermap?usercodes="+value;
			}else{
				document.getElementById('jxmap').src="getdvipmap?dvips="+value;
			}
		},
		menu:'#mm', 
		height:'50px',
		multiline:true,
		prompt:'根据用户号码或者,IP地址查询，号码间用“,"号隔开', 
	}); 
	
	$('#startusercache').click(function(){
		$.ajax({
			url:'startusercache',
			success:function(data){
				alert(data.msg);
			}
		});
	});
	
	$('#shutdownusercache').click(function(){
		$.ajax({
			url:'shutdownusercache',
			success:function(data){
				alert(data.msg);
			}
		});
	});
});